/**
 * 循环，非展开
 */
fn roll(){
    let arr=[1,2,3];
    let mut total=0;
    for i in 0..arr.len(){
        total=total+arr[i];
    }
    println!("{}",total);
}
/**
 * 展开测试1
 */
fn unroll_one(){
    let arr=[1,2,3];
    let mut total=0;
    total=total+arr[0]+arr[1]+arr[2];
    println!("{}",total);
}
/**
 * 展开测试2
 */
fn unroll_two(){
    let a=1;
    let b=2;
    let c=3;
    let mut total=0;
    total=a+b+c;
    println!("{}",total);
}

fn main(){
    roll();
    unroll_one();
    unroll_two();
}
